package org.zzq.my12306.frameworks.starter.designpattern.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.zzq.my12306.frameworks.starter.designpattern.chain.AbstractChainContext;
import org.zzq.my12306.frameworks.starter.designpattern.strategy.AbstractStrategyChoose;

/**
 * 设计模式组件库自动装配
 */
@Configuration
public class DesignPatternAutoConfiguration {
    /**
     * 执行策略选择器
     */
    @Bean
    public AbstractStrategyChoose abstractStrategyChoose() {
        return new AbstractStrategyChoose();
    }

    /**
     * 责任链上下文
     */
    @Bean
    public AbstractChainContext abstractChainContext() {
        return new AbstractChainContext();
    }
}
